package com.example.demo.enums;

/**
 * 枚举常量
 * Created by gf on 2018/10/20.
 */
public enum  ResponseCode {

    SUCCESS(0,"SUCCESS"),
    ERROR(1,"ERROR"),
    NEED_LOGIN(10,"NEED_LOGIN"),
    ILLEGAL_ARGUMENT(20,"ILLEGAL_ARGUMENT"),
    ERROR_EXCEPTION(-1,"未知错误");

    private int code;
    private String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
